#ifndef NODE_INFO_H
#define NODE_INFO_H

#include <string>
#include <vector>

/**
 * @brief:  节点信息
 */
class NodeInfo
{
public:
    NodeInfo() = default;
    NodeInfo(const std::string &pkg, const std::string &type, const std::string &name)
        : pkg(pkg), type(type), name(name)
    {}

    std::string pkg;//Package of node.
    std::string type;//Node type. There must be a corresponding executable with the same name.
    std::string name;//Node name. NOTE: name cannot contain a namespace. Use the ns attribute instead.
    std::string execPath;//Node exec path

    //optional
    std::string args;//optional, Pass arguments to node.
    std::vector<std::string> envs;//optional, Environment variables to set for the node.
    bool respawn{false};//optional, Restart the node automatically if it quits.
    int respawnDelay{0};//optional, If respawn is true, wait respawn_delay seconds after the node failure is detected before attempting restart.
    bool printScreen{false};//optional, If printScreen is true, stdout/stderr from the node will be sent to the screen
};

#endif //NODE_INFO_H
